package lab02.Test37;

import java.util.Scanner;

public class StudentDemo {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        Undergraduate undergraduate=new Undergraduate();
        System.out.println("请输入本科生名字、类别、成绩：");
        undergraduate.name=scanner.next();
        undergraduate.classification=scanner.next();
        for(int i=0;i<undergraduate.score.length;i++){
            undergraduate.score[i]=scanner.nextDouble();
        }
        undergraduate.AverageScore();
        System.out.println(undergraduate.name+"\t"+
                undergraduate.classification+"\t"+undergraduate.IfGraduate());
        Graduate graduate=new Graduate();
        System.out.println("请输入研究科生名字、类别、成绩：");
        graduate.name=scanner.next();
        graduate.classification=scanner.next();
        for (int j=0;j<graduate.score.length;j++){
            graduate.score[j]=scanner.nextDouble();
        }
        graduate.AverageScore();
        System.out.println(graduate.name+"\t"+
                graduate.classification+"\t"+graduate.IfGraduate());
    }
}
